package com.bwhx.eruler.dao;

import java.util.List;
import java.util.Map;

import com.bwhx.eruler.bean.ChuKuDan;
import com.bwhx.eruler.bean.Page;
import com.bwhx.eruler.bean.Ruler;

public interface RulerDao extends BaseDao<Ruler> {

	List<Ruler> findByName(String rulername);

	String insertSN(String device);

	void inputRuler(Ruler r);

	List<Ruler> list(Page p, Long startdateLong, Long enddateLong);

	Integer count(Ruler r, Long startdateLong, Long enddateLong);
	
	List<Ruler> list(Page p);

	Integer count(Ruler r);

	void insertChuKuDan(ChuKuDan chukudan);

	void update(ChuKuDan chukudan);

	Ruler findByMAC(String mac);

	void updateByOrder(List<Ruler> rulers);

	String findUnusedSN(String device);

	Boolean isRsnAvliable(String rsn);

	Ruler findBySn(String opcode);

	Ruler findChuKuBySn(String opc);

	void updateByOrderBack(List<Ruler> rulers);

	void update(List<String> listCodes, Long time);

	Ruler find3BySn(String value);

	void insertRulerUser(Map<String, Integer> paramMap);

	void updateRFTime(Map map);

	void insertRulerSdk(Map<String, Object> paramMap);

	Ruler findByRSN(String rsn);

	Ruler findAvailableRulerBySn(String rsn);

	void baofei(List<Ruler> paramRulersList);

	Ruler findChuKuAndBaoFeiBySn(String opc);

}
